﻿$(function () {
    $("#accordion").togglepanels();
    $('#accordion2').accordion({ heightStyle: "content" });
    if (VK){
        VK.Widgets.Group("vk_groups", { mode: 0, width: "225", height: "400", color1: 'FFFFFF', color2: '000000', color3: '000000' }, 62398501);
    }
    //if (OK) {
    //    OK.CONNECT.insertGroupWidget("ok_group_widget", "53018112491624", "{width:225,height:400}");
    //}
        //$('body').onlinechat('option', 'additionalTrigger', $('a#chatTrigger'));
    $('#vkTrigger').click(function () {
        var iframe = $('iframe', $(this).next());
        if (iframe.height() == 0) {
            iframe.height(400);
        }
    });
});

$(document).ready(function () {
    $("img.a").hover(
    function () {
        $(this).stop().animate({ "opacity": "0" }, "slow");
        $("img.b").show();
    },
    function () {
        $(this).stop().animate({ "opacity": "1" }, "slow");
    });

    $('span.tooltip').tooltip({
        show: 0,
        hide:0,
        position: {
            my: "center bottom-20",
            at: "right top",
            collision:"none none",
            using: function (position, feedback) {
                $(this).css(position);
                $("<div>")
                .addClass("arrow")
                .addClass(feedback.vertical)
                .addClass(feedback.horizontal)
                .appendTo(this);
            }
        }
    });
});




(function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/ru_RU/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));